Aim (grant application)

The aim of this project is to develop a generic dashboard, e.g. a R shiny application to 1) inspect model inputs and outputs, 2) visualise the original inputs and outputs, 3) investigate the relationship between model inputs and outputs through metamodelling and data visualisation methods, 4) save the performed analyses.

For info

Package with supporting functions can be found here: https://github.com/Xa4P/pacheck.
This App should focus on validation of the health economic model (using the probabilistic inputs/ outputs).

Structure shiny app

The envisoned R Shiny app will have the following tabs. I’ve developed some functions already to implement. Currently, I’ve only considered 2 strategies (“intervention” (_in) and “comparator” (_comp)). What is shown in this document is based on the probabilistic analysis of a (toy) 3-states Health state transition model (Progression-free (PF), Progressed disease(PD), Dead(D)) depicted in Figure 1. The intervention is only having an effect on the probability of progression, and incurs costs in the Progression-Free health state.

Voor Karel: elke cijfer is een aparte tab van de app.

1. Upload of original health economic model inputs and outputs

Content:

  • Welcome message
  • Instructions
  • Upload 1 file with inputs and outputs (or 2? inputs and outputs separately?)
  • Select variables representing total costs and effects for each strategy (to calculate increments and (incremental) net benefits)
df_pa <- calculate_nb(df = df_pa,
                      e_int = "QALY_int",
                      e_comp = "QALY_comp",
                      c_int = "Costs_int",
                      c_comp = "Costs_comp",
                      wtp = 80000)# calculate net benefits

2. Investigate model inputs and outputs

a. Summary statistics of (user-selected) model inputs and outputs

To examine whether cost inputs are always positive for instance

df <- generate_sum_stats(df_pa)
kable(df)
Parameter Mean SD Percentile_2.5th Percentile_97.5th Minimum Maximum
p_pfspd 0.150 0.035 0.088 0.226 0.049 0.316
p_pfsd 0.100 0.030 0.049 0.165 0.023 0.244
p_pdd 0.201 0.040 0.129 0.283 0.073 0.366
p_dd 1.000 0.000 1.000 1.000 1.000 1.000
rr 0.753 0.068 0.630 0.895 0.535 1.033
u_pfs 0.816 0.065 0.675 0.924 0.491 0.974
u_pd 0.587 0.103 0.382 0.776 0.207 0.898
u_d 0.000 0.000 0.000 0.000 0.000 0.000
c_pfs 998.950 202.516 603.870 1392.049 202.083 1771.015
c_pd 1993.689 401.306 1203.104 2782.842 388.754 3707.492
c_d 0.000 0.000 0.000 0.000 0.000 0.000
c_thx 10000.807 98.670 9807.326 10194.863 9632.935 10341.933
QALY_comp 4.005 0.743 2.727 5.644 1.939 7.889
QALY_int 4.309 0.824 2.894 6.105 2.104 8.433
Costs_comp 7223.596 1593.274 4473.077 10703.240 2425.117 17054.204
Costs_int 38841.599 7233.474 26434.052 54575.070 19181.834 78244.121
Inc_QALY 0.304 0.170 0.050 0.703 -0.291 1.562
Inc_Costs 31618.003 6576.688 20379.534 46057.098 15154.291 66447.151
NMB_int 305872.059 60085.800 202019.061 436642.750 148476.152 609534.328
NMB_comp 313195.478 58530.830 212540.838 442388.664 151753.123 614042.727
iNMB -7323.419 10571.658 -24480.486 16838.699 -52000.775 61320.703
NHB_int 3.823 0.751 2.525 5.458 1.856 7.619
NHB_comp 3.915 0.732 2.657 5.530 1.897 7.676
iNHB -0.092 0.132 -0.306 0.210 -0.650 0.767
rm(df)

b. Correlation matrix inputs (and outputs)

Question Karel:
- kan dit met kleuren om de sterke van de associatie te onderbouwen?

generate_cor(df_pa)
## Warning in cor(df): the standard deviation is zero
##                 p_pfspd        p_pfsd        p_pdd p_dd           rr
## p_pfspd     1.000000000 -0.1390333051 -0.010495755   NA  0.013176795
## p_pfsd     -0.139033305  1.0000000000 -0.010816151   NA  0.004160546
## p_pdd      -0.010495755 -0.0108161511  1.000000000   NA -0.009214208
## p_dd                 NA            NA           NA    1           NA
## rr          0.013176795  0.0041605456 -0.009214208   NA  1.000000000
## u_pfs      -0.010233113 -0.0139012374  0.006358543   NA -0.010099636
## u_pd        0.019283717 -0.0056315922 -0.002787892   NA -0.010150340
## u_d                  NA            NA           NA   NA           NA
## c_pfs       0.005755797  0.0005144779 -0.015172213   NA -0.001911507
## c_pd       -0.001879029 -0.0074655735 -0.020431937   NA -0.014541343
## c_d                  NA            NA           NA   NA           NA
## c_thx      -0.001009073 -0.0236999322  0.006581438   NA -0.012871127
## QALY_comp  -0.253588264 -0.6735920331 -0.384481458   NA -0.006767802
## QALY_int   -0.224667628 -0.7439538243 -0.300979631   NA -0.122611874
## Costs_comp  0.119961253 -0.5263861075 -0.478023551   NA -0.005342058
## Costs_int  -0.510900215 -0.7102236038 -0.075277748   NA -0.223503355
## Inc_QALY    0.018834190 -0.6615605116  0.220270065   NA -0.563306427
## Inc_Costs  -0.590983549 -0.6536278325  0.033010989   NA -0.244529505
## NMB_int    -0.184925056 -0.7305164562 -0.321071795   NA -0.107582111
## NMB_comp   -0.260628921 -0.6692910076 -0.377192915   NA -0.006723138
## iNMB        0.391940138 -0.4464301719  0.263493089   NA -0.574237852
## NHB_int    -0.184925056 -0.7305164562 -0.321071795   NA -0.107582111
## NHB_comp   -0.260628921 -0.6692910076 -0.377192915   NA -0.006723138
## iNHB        0.391940138 -0.4464301719  0.263493089   NA -0.574237852
##                   u_pfs         u_pd u_d         c_pfs         c_pd c_d
## p_pfspd    -0.010233113  0.019283717  NA  0.0057557965 -0.001879029  NA
## p_pfsd     -0.013901237 -0.005631592  NA  0.0005144779 -0.007465573  NA
## p_pdd       0.006358543 -0.002787892  NA -0.0151722129 -0.020431937  NA
## p_dd                 NA           NA  NA            NA           NA  NA
## rr         -0.010099636 -0.010150340  NA -0.0019115067 -0.014541343  NA
## u_pfs       1.000000000  0.007466828  NA -0.0017889376 -0.015444679  NA
## u_pd        0.007466828  1.000000000  NA  0.0046724428  0.012595157  NA
## u_d                  NA           NA   1            NA           NA  NA
## c_pfs      -0.001788938  0.004672443  NA  1.0000000000 -0.000232108  NA
## c_pd       -0.015444679  0.012595157  NA -0.0002321080  1.000000000  NA
## c_d                  NA           NA  NA            NA           NA   1
## c_thx      -0.008116731  0.007440294  NA  0.0123971920  0.011433502  NA
## QALY_comp   0.269082381  0.382315481  NA  0.0021434831  0.013324345  NA
## QALY_int    0.292116700  0.306768756  NA  0.0004196619  0.012716009  NA
## Costs_comp -0.004667026  0.015616730  NA  0.3427335816  0.585434582  NA
## Costs_int   0.016651801 -0.003383216  NA  0.0858487599  0.121224827  NA
## Inc_QALY    0.239747594 -0.182842530  NA -0.0073115683  0.003416044  NA
## Inc_Costs   0.019445382 -0.007504406  NA  0.0113911703 -0.008496863  NA
## NMB_int     0.318408080  0.336891345  NA -0.0098746547 -0.000645991  NA
## NMB_comp    0.273215262  0.387581921  NA -0.0071541959 -0.002413475  NA
## iNMB        0.297047822 -0.231099574  NA -0.0165144854  0.009690798  NA
## NHB_int     0.318408080  0.336891345  NA -0.0098746547 -0.000645991  NA
## NHB_comp    0.273215262  0.387581921  NA -0.0071541959 -0.002413475  NA
## iNHB        0.297047822 -0.231099574  NA -0.0165144854  0.009690798  NA
##                   c_thx    QALY_comp      QALY_int   Costs_comp    Costs_int
## p_pfspd    -0.001009073 -0.253588264 -0.2246676276  0.119961253 -0.510900215
## p_pfsd     -0.023699932 -0.673592033 -0.7439538243 -0.526386108 -0.710223604
## p_pdd       0.006581438 -0.384481458 -0.3009796313 -0.478023551 -0.075277748
## p_dd                 NA           NA            NA           NA           NA
## rr         -0.012871127 -0.006767802 -0.1226118737 -0.005342058 -0.223503355
## u_pfs      -0.008116731  0.269082381  0.2921167001 -0.004667026  0.016651801
## u_pd        0.007440294  0.382315481  0.3067687559  0.015616730 -0.003383216
## u_d                  NA           NA            NA           NA           NA
## c_pfs       0.012397192  0.002143483  0.0004196619  0.342733582  0.085848760
## c_pd        0.011433502  0.013324345  0.0127160085  0.585434582  0.121224827
## c_d                  NA           NA            NA           NA           NA
## c_thx       1.000000000  0.013019157  0.0154765010  0.021052846  0.065247154
## QALY_comp   0.013019157  1.000000000  0.9816698273  0.556292870  0.765003861
## QALY_int    0.015476501  0.981669827  1.0000000000  0.553244013  0.823974129
## Costs_comp  0.021052846  0.556292870  0.5532440127  1.000000000  0.503641319
## Costs_int   0.065247154  0.765003861  0.8239741290  0.503641319  1.000000000
## Inc_QALY    0.018092244  0.388489874  0.5569880350  0.250673380  0.650098971
## Inc_Costs   0.066662827  0.706633521  0.7722315156  0.311676945  0.977853128
## NMB_int     0.009120812  0.984664168  0.9976707214  0.546203013  0.783403016
## NMB_comp    0.012639891  0.999744127  0.9812240653  0.537353311  0.762682825
## iNMB       -0.018142098  0.061341401  0.2378041368  0.129337279  0.229948586
## NHB_int     0.009120812  0.984664168  0.9976707214  0.546203013  0.783403016
## NHB_comp    0.012639891  0.999744127  0.9812240653  0.537353311  0.762682825
## iNHB       -0.018142098  0.061341401  0.2378041368  0.129337279  0.229948586
##                Inc_QALY    Inc_Costs      NMB_int     NMB_comp         iNMB
## p_pfspd     0.018834190 -0.590983549 -0.184925056 -0.260628921  0.391940138
## p_pfsd     -0.661560512 -0.653627832 -0.730516456 -0.669291008 -0.446430172
## p_pdd       0.220270065  0.033010989 -0.321071795 -0.377192915  0.263493089
## p_dd                 NA           NA           NA           NA           NA
## rr         -0.563306427 -0.244529505 -0.107582111 -0.006723138 -0.574237852
## u_pfs       0.239747594  0.019445382  0.318408080  0.273215262  0.297047822
## u_pd       -0.182842530 -0.007504406  0.336891345  0.387581921 -0.231099574
## u_d                  NA           NA           NA           NA           NA
## c_pfs      -0.007311568  0.011391170 -0.009874655 -0.007154196 -0.016514485
## c_pd        0.003416044 -0.008496863 -0.000645991 -0.002413475  0.009690798
## c_d                  NA           NA           NA           NA           NA
## c_thx       0.018092244  0.066662827  0.009120812  0.012639891 -0.018142098
## QALY_comp   0.388489874  0.706633521  0.984664168  0.999744127  0.061341401
## QALY_int    0.556988035  0.772231516  0.997670721  0.981224065  0.237804137
## Costs_comp  0.250673380  0.311676945  0.546203013  0.537353311  0.129337279
## Costs_int   0.650098971  0.977853128  0.783403016  0.762682825  0.229948586
## Inc_QALY    1.000000000  0.654293217  0.532678288  0.387449729  0.882420376
## Inc_Costs   0.654293217  1.000000000  0.729314498  0.708669007  0.221579204
## NMB_int     0.532678288  0.729314498  1.000000000  0.984454647  0.233156612
## NMB_comp    0.387449729  0.708669007  0.984454647  1.000000000  0.058733889
## iNMB        0.882420376  0.221579204  0.233156612  0.058733889  1.000000000
## NHB_int     0.532678288  0.729314498  1.000000000  0.984454647  0.233156612
## NHB_comp    0.387449729  0.708669007  0.984454647  1.000000000  0.058733889
## iNHB        0.882420376  0.221579204  0.233156612  0.058733889  1.000000000
##                 NHB_int     NHB_comp         iNHB
## p_pfspd    -0.184925056 -0.260628921  0.391940138
## p_pfsd     -0.730516456 -0.669291008 -0.446430172
## p_pdd      -0.321071795 -0.377192915  0.263493089
## p_dd                 NA           NA           NA
## rr         -0.107582111 -0.006723138 -0.574237852
## u_pfs       0.318408080  0.273215262  0.297047822
## u_pd        0.336891345  0.387581921 -0.231099574
## u_d                  NA           NA           NA
## c_pfs      -0.009874655 -0.007154196 -0.016514485
## c_pd       -0.000645991 -0.002413475  0.009690798
## c_d                  NA           NA           NA
## c_thx       0.009120812  0.012639891 -0.018142098
## QALY_comp   0.984664168  0.999744127  0.061341401
## QALY_int    0.997670721  0.981224065  0.237804137
## Costs_comp  0.546203013  0.537353311  0.129337279
## Costs_int   0.783403016  0.762682825  0.229948586
## Inc_QALY    0.532678288  0.387449729  0.882420376
## Inc_Costs   0.729314498  0.708669007  0.221579204
## NMB_int     1.000000000  0.984454647  0.233156612
## NMB_comp    0.984454647  1.000000000  0.058733889
## iNMB        0.233156612  0.058733889  1.000000000
## NHB_int     1.000000000  0.984454647  0.233156612
## NHB_comp    0.984454647  1.000000000  0.058733889
## iNHB        0.233156612  0.058733889  1.000000000

c. Histogram, density distribution of (user-selected) model inputs and outputs

To visually investigate the parameter distributions

Single parameter

p_1 <- vis_1_param(df = df_pa,
            param = "u_pfs",
            binwidth = NULL,
            type = "histogram",
            dist = c("norm", "beta", "gamma", "lnorm"))
## Loading required package: fitdistrplus
## Loading required package: MASS
## 
## Attaching package: 'MASS'
## The following object is masked from 'package:plotly':
## 
##     select
## Loading required package: survival
p_1
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

paste("Probability to be in user-defined range: ",
      check_range(df_pa,
                  outcome = "u_pfs",
                  min_val = 0.77,
                  max_val = 0.80
                  ), "%") # add this to plot? + lines of min/ max on plot?
## [1] "Probability to be in user-defined range:  14 %"

Two parameters

p_2p <- vis_2_params(df = df_pa,
                     param_1 = "u_pfs",
                     param_2 = "u_pd",
                     slope = 1,
                     check = "param_2 > param_1")
## [1] "P(TRUE): 3 %"
p_2p

c. Possibility to fit user-selected distributions (beta, gamma, lognormal, normal) + visualisation + parameters of the fitted distribution.

To cross check with parameters reported in documentation/report/ journal article, as an implementation check
- To do XP: Add probabilistic mean value per distribution

p_2 <- vis_1_param(df = df_pa,
            param = "u_pfs",
            binwidth = NULL,
            type = "density",
            dist = c("norm", "beta", "gamma", "lnorm"),
            user_dist = "beta",
            user_param_1 = 0.8,
            user_param_2 = 0.2,
            user_mean = 0.75)
p_2
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

Distributions’ parameters & statistical fit

l_dist <- fit_dist(df = df_pa,
                   param = "u_pfs",
                   dist = c("norm", "beta", "gamma", "lnorm"))
l_dist[[1]]
##   Distribution    AIC
## 1         norm -26434
## 2         beta -27051
## 3        gamma -26080
## 4        lnorm -25867
l_dist[[2]]
##   Distribution Name_param_1 Value_param_1 Name_param_2 Value_param_2
## 1         norm         mean          0.82           sd          0.06
## 2         beta       shape1         28.78       shape2          6.47
## 3        gamma        shape        153.84         rate        188.42
## 4        lnorm      meanlog         -0.21        sdlog          0.08

3. Investigate model outputs

a. Incremental cost-effectiveness plane & summary

Questions met Karel te bespreken:
- Interactive plot where you can click on a dot, or select some dots and see which input parameters combination has led to these outputs –> ook mogelijkheid om een bepaalde ‘gebied’ te selecteren (invoeren) en te zien welke inputs daarbij behoren.
- Combineren van de plot hierbeneden met de histogrammen van de waarden op de x en y as, of als niet overzichtelijk: met ticks op de axes als er een datapunt is.

p_3 <- plot_ice(df = df_pa,
                param_1 = "Inc_QALY",
                param_2 = "Inc_Costs",
                wtp = 80000)
## Loading required package: scales
p_3

p_3_interact <- ggplotly(p_3)
p_3_interact
summary_ice(df_pa,
           "Inc_QALY",
           "Inc_Costs")
##                                     Quadrant Percentage
## 1 NorthEast (more effective, more expensive)       100%
## 2 SouthEast (more effective, less expensive)         0%
## 3 NorthWest (less effective, more expensive)         0%
## 4 SouthWest (less effective, less expensive)         0%
  • Plot hierboven koppelen aan een graphs van 1 en 2 input parameters. Al gedaan in tentative shiny app voor onderwijs: selectie van punten in de ‘input graph’ wordt gehighlight in andere plot. Voorbeeld, laatste tabs van volgende shiny app: shiny::runGitHub("Teaching", "Xa4P", subdir = "Basics/shiny_app_cea/", ref = "main").

b. Cost-effectiveness acceptability curve.

df_ceac <- calculate_ceac(df = df_pa,
                     e_int = "QALY_int",
                     e_comp = "QALY_comp",
                     c_int = "Costs_int",
                     c_comp = "Costs_comp")

plot_ceac(df = df_ceac,
          wtp = "WTP_threshold")
## Loading required package: reshape2

df_ceac
##     WTP_threshold Prob_int Prob_comp
## 1               0   0.0000    1.0000
## 2            1000   0.0000    1.0000
## 3            2000   0.0000    1.0000
## 4            3000   0.0000    1.0000
## 5            4000   0.0000    1.0000
## 6            5000   0.0000    1.0000
## 7            6000   0.0000    1.0000
## 8            7000   0.0000    1.0000
## 9            8000   0.0000    1.0000
## 10           9000   0.0000    1.0000
## 11          10000   0.0000    1.0000
## 12          11000   0.0000    1.0000
## 13          12000   0.0000    1.0000
## 14          13000   0.0000    1.0000
## 15          14000   0.0000    1.0000
## 16          15000   0.0000    1.0000
## 17          16000   0.0000    1.0000
## 18          17000   0.0000    1.0000
## 19          18000   0.0000    1.0000
## 20          19000   0.0000    1.0000
## 21          20000   0.0000    1.0000
## 22          21000   0.0000    1.0000
## 23          22000   0.0000    1.0000
## 24          23000   0.0000    1.0000
## 25          24000   0.0000    1.0000
## 26          25000   0.0000    1.0000
## 27          26000   0.0000    1.0000
## 28          27000   0.0000    1.0000
## 29          28000   0.0000    1.0000
## 30          29000   0.0000    1.0000
## 31          30000   0.0000    1.0000
## 32          31000   0.0000    1.0000
## 33          32000   0.0000    1.0000
## 34          33000   0.0000    1.0000
## 35          34000   0.0000    1.0000
## 36          35000   0.0000    1.0000
## 37          36000   0.0000    1.0000
## 38          37000   0.0000    1.0000
## 39          38000   0.0000    1.0000
## 40          39000   0.0002    0.9998
## 41          40000   0.0007    0.9993
## 42          41000   0.0017    0.9983
## 43          42000   0.0022    0.9978
## 44          43000   0.0030    0.9970
## 45          44000   0.0040    0.9960
## 46          45000   0.0051    0.9949
## 47          46000   0.0061    0.9939
## 48          47000   0.0074    0.9926
## 49          48000   0.0086    0.9914
## 50          49000   0.0099    0.9901
## 51          50000   0.0118    0.9882
## 52          51000   0.0142    0.9858
## 53          52000   0.0170    0.9830
## 54          53000   0.0194    0.9806
## 55          54000   0.0235    0.9765
## 56          55000   0.0274    0.9726
## 57          56000   0.0314    0.9686
## 58          57000   0.0352    0.9648
## 59          58000   0.0390    0.9610
## 60          59000   0.0440    0.9560
## 61          60000   0.0498    0.9502
## 62          61000   0.0552    0.9448
## 63          62000   0.0608    0.9392
## 64          63000   0.0691    0.9309
## 65          64000   0.0756    0.9244
## 66          65000   0.0825    0.9175
## 67          66000   0.0889    0.9111
## 68          67000   0.0963    0.9037
## 69          68000   0.1045    0.8955
## 70          69000   0.1142    0.8858
## 71          70000   0.1243    0.8757
## 72          71000   0.1330    0.8670
## 73          72000   0.1414    0.8586
## 74          73000   0.1507    0.8493
## 75          74000   0.1579    0.8421
## 76          75000   0.1680    0.8320
## 77          76000   0.1763    0.8237
## 78          77000   0.1856    0.8144
## 79          78000   0.1964    0.8036
## 80          79000   0.2046    0.7954
## 81          80000   0.2125    0.7875
## 82          81000   0.2233    0.7767
## 83          82000   0.2334    0.7666
## 84          83000   0.2427    0.7573
## 85          84000   0.2531    0.7469
## 86          85000   0.2621    0.7379
## 87          86000   0.2728    0.7272
## 88          87000   0.2828    0.7172
## 89          88000   0.2917    0.7083
## 90          89000   0.3021    0.6979
## 91          90000   0.3124    0.6876
## 92          91000   0.3216    0.6784
## 93          92000   0.3325    0.6675
## 94          93000   0.3420    0.6580
## 95          94000   0.3510    0.6490
## 96          95000   0.3587    0.6413
## 97          96000   0.3685    0.6315
## 98          97000   0.3792    0.6208
## 99          98000   0.3887    0.6113
## 100         99000   0.3966    0.6034
## 101        100000   0.4054    0.5946

c. Histogram and density distribution of total and incremental costs and effects.

Can use the function above!

###d. Convergence graph of outcomes

plot_convergence(df = df_pa,
                 outcome = "iNMB"
                 )

4. Investigate relation between inputs and outputs

Single

  • To do XP: Add R2
lm_rr <- fit_lm_metamodel(df = df_pa,
                          x = "rr",
                          y = "iNMB")
lm_pred <- unlist(predict(lm_rr, data.frame(rr = df_pa$rr)))
df_obs_pred <- data.frame(
  Values = df_pa$rr,
  Observed = df_pa$iNMB,
  Predicted = lm_pred
)
ggplot(data = df_obs_pred, aes(x = Values, y = Observed)) +
  geom_point(shape = 1, colour = "lightgrey") +
  geom_smooth(method = "lm") +
  theme_bw()
## `geom_smooth()` using formula 'y ~ x'

plot(lm_rr)

Multiple

  • To do XP: Add R2
lm_full <- fit_lm_metamodel(df = df_pa,
                          x = c("rr", "u_pfs", "u_pd", "c_pfs", "c_pd", "c_thx", "p_pfspd", "p_pfsd", "p_pdd"),
                          y = "iNMB")
lm_pred_full <- predict(lm_full, data.frame(rr = df_pa$rr,
                            u_pfs = mean(df_pa$u_pfs),
                            u_pd = mean(df_pa$u_pd),
                            c_pfs = mean(df_pa$c_pfs),
                            c_pd = mean(df_pa$c_pd),
                            c_thx = mean(df_pa$c_thx),
                            p_pfspd = mean(df_pa$p_pfspd),
                            p_pfsd = mean(df_pa$p_pfsd),
                            p_pdd = mean(df_pa$p_pdd)))

df_obs_pred_full <- data.frame(
  Values = df_pa$rr,
  Observed = df_pa$iNMB,
  Predicted = lm_pred_full
)

ggplot(data = df_obs_pred_full, aes(x = Values, y = Observed)) +
  geom_point(shape = 1, colour = "lightgrey") +
  geom_line(data = df_obs_pred_full, aes(x = Values, y = Predicted), colour = "blue") +
  theme_bw()

plot(lm_full)

df_dsa <- dsa_lm_metamodel(df = df_pa,
                           lm_metamodel = lm_full)
plot_tornado(df = df_dsa,
             df_basecase = df_pa,
             outcome = "iNMB")
## Loading required package: tidyverse
## -- Attaching packages --------------------------------------- tidyverse 1.3.0 --
## v tibble  3.0.5     v dplyr   1.0.3
## v tidyr   1.1.2     v stringr 1.4.0
## v readr   1.4.0     v forcats 0.5.1
## v purrr   0.3.4
## -- Conflicts ------------------------------------------ tidyverse_conflicts() --
## x readr::col_factor() masks scales::col_factor()
## x purrr::discard()    masks scales::discard()
## x dplyr::filter()     masks plotly::filter(), stats::filter()
## x dplyr::lag()        masks stats::lag()
## x dplyr::select()     masks MASS::select(), plotly::select()

5. Add predictions based on metamodel

Other activities/ questions/ to do’s

  • Two-way sensitivity analysis based on metamodel.
  • Include other functional forms of metamodels
  • Include predictions of outcome based on metamodels
  • Unit tests of data using testthat? (automatic check of costs are positive for instance, or utility values between 0-1, sum of transition probabilities not > 1). XAVIER to check whether it has added value to use package or just do it ‘by hand’. Question to Karel: I neem aan dat het mogelijk is om groepen van variabelen te ‘labellen’ (dus alle kosten, utiliteiten, probabiliteiten) en dat de Shiny App het als ‘groep’ ziet?
  • Check results of deterministic sensitivity analyses using original model and metamodel.
  • XP to do: Add possibility of having multiple scenarios loaded.
  • XP to do: Add intermediaire outcomes.
  • Shapley value, zou dat kunnen lukken? Zou het mogelijk zijn om dat op de originele data set te doen? KernelExplainer on this github: https://github.com/slundberg/shap. Of is dit iets? https://github.com/nredell/shapFlex, maar ziet eruit dat je ook een model moet fitten (niet model agnostic)
  • Check whether violin plot have added value
  • Karel, voor selectie variabelen voor de verschillende functies: gebruik van buttons? wat zou handig zijn?